\section{TiXmlPrinter Class Reference}
\label{classTiXmlPrinter}\index{TiXmlPrinter@{TiXmlPrinter}}
{\tt \#include $<$tinyxml.h$>$}

Inheritance diagram for TiXmlPrinter::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classTiXmlPrinter}
\end{center}
\end{figure}


\subsection{Detailed Description}
Print to memory functionality. The \doxyref{TiXmlPrinter}{p.}{classTiXmlPrinter} is useful when you need to:

\begin{enumerate}
\item Print to memory (especially in non-STL mode)\item Control formatting (line endings, etc.)\end{enumerate}


When constructed, the \doxyref{TiXmlPrinter}{p.}{classTiXmlPrinter} is in its default \char`\"{}pretty printing\char`\"{} mode. Before calling Accept() you can call methods to control the printing of the XML document. After \doxyref{TiXmlNode::Accept()}{p.}{classTiXmlNode_cc0f88b7462c6cb73809d410a4f5bb86} is called, the printed document can be accessed via the \doxyref{CStr()}{p.}{classTiXmlPrinter_859eede9597d3e0355b77757be48735e}, Str(), and \doxyref{Size()}{p.}{classTiXmlPrinter_d01375ae9199bd2f48252eaddce3039d} methods.

\doxyref{TiXmlPrinter}{p.}{classTiXmlPrinter} uses the Visitor API. 

\footnotesize\begin{verbatim}
	TiXmlPrinter printer;
	printer.SetIndent( "\t" );

	doc.Accept( &printer );
	fprintf( stdout, "%s", printer.CStr() );
	\end{verbatim}
\normalsize
 \subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf TiXmlPrinter} ()
\item 
virtual bool {\bf VisitEnter} (const {\bf TiXmlDocument} \&doc)
\begin{CompactList}\small\item\em Visit a document. \item\end{CompactList}\item 
virtual bool {\bf VisitExit} (const {\bf TiXmlDocument} \&doc)
\begin{CompactList}\small\item\em Visit a document. \item\end{CompactList}\item 
virtual bool {\bf VisitEnter} (const {\bf TiXmlElement} \&element, const {\bf TiXmlAttribute} $\ast$firstAttribute)
\begin{CompactList}\small\item\em Visit an element. \item\end{CompactList}\item 
virtual bool {\bf VisitExit} (const {\bf TiXmlElement} \&element)
\begin{CompactList}\small\item\em Visit an element. \item\end{CompactList}\item 
virtual bool {\bf Visit} (const {\bf TiXmlDeclaration} \&declaration)
\begin{CompactList}\small\item\em Visit a declaration. \item\end{CompactList}\item 
virtual bool {\bf Visit} (const {\bf TiXmlText} \&text)
\begin{CompactList}\small\item\em Visit a text node. \item\end{CompactList}\item 
virtual bool {\bf Visit} (const {\bf TiXmlComment} \&comment)
\begin{CompactList}\small\item\em Visit a comment node. \item\end{CompactList}\item 
virtual bool {\bf Visit} (const {\bf TiXmlUnknown} \&unknown)
\begin{CompactList}\small\item\em Visit an unknow node. \item\end{CompactList}\item 
void {\bf SetIndent} (const char $\ast$\_\-indent)
\item 
const char $\ast$ {\bf Indent} ()
\begin{CompactList}\small\item\em Query the indention string. \item\end{CompactList}\item 
void {\bf SetLineBreak} (const char $\ast$\_\-lineBreak)
\item 
const char $\ast$ {\bf LineBreak} ()
\begin{CompactList}\small\item\em Query the current line breaking string. \item\end{CompactList}\item 
void {\bf SetStreamPrinting} ()
\item 
const char $\ast$ {\bf CStr} ()
\begin{CompactList}\small\item\em Return the result. \item\end{CompactList}\item 
size\_\-t {\bf Size} ()
\begin{CompactList}\small\item\em Return the length of the result string. \item\end{CompactList}\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{TiXmlPrinter@{TiXmlPrinter}!TiXmlPrinter@{TiXmlPrinter}}
\index{TiXmlPrinter@{TiXmlPrinter}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TiXmlPrinter::TiXmlPrinter ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_6539b864026c8667cd0bd5fdf4b41f43}




\subsection{Member Function Documentation}
\index{TiXmlPrinter@{TiXmlPrinter}!VisitEnter@{VisitEnter}}
\index{VisitEnter@{VisitEnter}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::VisitEnter (const {\bf TiXmlDocument} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_2ec73087db26ff4d2c4316c56f861db7}


Visit a document. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_07baecb52dd7d8716ae2a48ad0956ee0}.\index{TiXmlPrinter@{TiXmlPrinter}!VisitExit@{VisitExit}}
\index{VisitExit@{VisitExit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::VisitExit (const {\bf TiXmlDocument} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_0a636046fa589b6d7f3e5bd025b3f33e}


Visit a document. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_a0ade4f27087447e93974e975c3246ad}.\index{TiXmlPrinter@{TiXmlPrinter}!VisitEnter@{VisitEnter}}
\index{VisitEnter@{VisitEnter}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::VisitEnter (const {\bf TiXmlElement} \&, const {\bf TiXmlAttribute} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_6dccaf5ee4979f13877690afe28721e8}


Visit an element. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_f6c6178ffa517bbdba95d70490875fff}.\index{TiXmlPrinter@{TiXmlPrinter}!VisitExit@{VisitExit}}
\index{VisitExit@{VisitExit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::VisitExit (const {\bf TiXmlElement} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_e6a1df8271df4bf62d7873c38e34aa69}


Visit an element. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_ec2b1f8116226d52f3a1b95dafd3a32c}.\index{TiXmlPrinter@{TiXmlPrinter}!Visit@{Visit}}
\index{Visit@{Visit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::Visit (const {\bf TiXmlDeclaration} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_daf7eec4dc43ad071ff52b60361574f5}


Visit a declaration. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_fad71c71ce6473fb9b4b64cd92de4a19}.\index{TiXmlPrinter@{TiXmlPrinter}!Visit@{Visit}}
\index{Visit@{Visit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::Visit (const {\bf TiXmlText} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_0857c5d32c59b9a257f9a49cb9411df5}


Visit a text node. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_399b8ebca5cd14664974a32d2ce029e5}.\index{TiXmlPrinter@{TiXmlPrinter}!Visit@{Visit}}
\index{Visit@{Visit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::Visit (const {\bf TiXmlComment} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_9870423f5603630e6142f6bdb66dfb57}


Visit a comment node. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_53a60e7a528627b31af3161972cc7fa2}.\index{TiXmlPrinter@{TiXmlPrinter}!Visit@{Visit}}
\index{Visit@{Visit}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TiXmlPrinter::Visit (const {\bf TiXmlUnknown} \&)\hspace{0.3cm}{\tt  [virtual]}}\label{classTiXmlPrinter_08591a15c9a07afa83c24e08b03d6358}


Visit an unknow node. 



Reimplemented from {\bf TiXmlVisitor} \doxyref{}{p.}{classTiXmlVisitor_7e284d607d275c51dac1adb58159ce28}.\index{TiXmlPrinter@{TiXmlPrinter}!SetIndent@{SetIndent}}
\index{SetIndent@{SetIndent}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TiXmlPrinter::SetIndent (const char $\ast$ {\em \_\-indent})\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_213377a4070c7e625bae59716b089e5e}


Set the indent characters for printing. By default 4 spaces but tab ($\backslash$t) is also useful, or null/empty string for no indentation. \index{TiXmlPrinter@{TiXmlPrinter}!Indent@{Indent}}
\index{Indent@{Indent}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ TiXmlPrinter::Indent ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_bb33ec7d4bad6aaeb57f4304394b133d}


Query the indention string. 

\index{TiXmlPrinter@{TiXmlPrinter}!SetLineBreak@{SetLineBreak}}
\index{SetLineBreak@{SetLineBreak}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TiXmlPrinter::SetLineBreak (const char $\ast$ {\em \_\-lineBreak})\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_4be1e37e69e3858c59635aa947174fe6}


Set the line breaking string. By default set to newline (\par
). Some operating systems prefer other characters, or can be set to the null/empty string for no indenation. \index{TiXmlPrinter@{TiXmlPrinter}!LineBreak@{LineBreak}}
\index{LineBreak@{LineBreak}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ TiXmlPrinter::LineBreak ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_11f1b4804a460b175ec244eb5724d96d}


Query the current line breaking string. 

\index{TiXmlPrinter@{TiXmlPrinter}!SetStreamPrinting@{SetStreamPrinting}}
\index{SetStreamPrinting@{SetStreamPrinting}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TiXmlPrinter::SetStreamPrinting ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_b23a90629e374cb1cadca090468bbd19}


Switch over to \char`\"{}stream printing\char`\"{} which is the most dense formatting without linebreaks. Common when the XML is needed for network transmission. \index{TiXmlPrinter@{TiXmlPrinter}!CStr@{CStr}}
\index{CStr@{CStr}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ TiXmlPrinter::CStr ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_859eede9597d3e0355b77757be48735e}


Return the result. 

\index{TiXmlPrinter@{TiXmlPrinter}!Size@{Size}}
\index{Size@{Size}!TiXmlPrinter@{TiXmlPrinter}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}size\_\-t TiXmlPrinter::Size ()\hspace{0.3cm}{\tt  [inline]}}\label{classTiXmlPrinter_d01375ae9199bd2f48252eaddce3039d}


Return the length of the result string. 



The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFinput/TinyXML/{\bf tinyxml.h}\item 
/home/msneddon/eclipse/ganymede\_\-cpp/workspace/NFsim\_\-svn/src/NFinput/TinyXML/{\bf tinyxml.cpp}\end{CompactItemize}
